<template>
  <div class="storeProjectsQrchain"></div>
</template>
<script>
export default {
  data() {
    return {};
  },
  activated() {
    this.getData();
  },
  methods: {
    async getData() {
      let { data, msg, result } = await $http.post("plugin.store-projects-qrchain.frontend.qrchain.info", { g_id: this.$route.query.g_id, qr_num: this.$route.query.qr_num }, "");
      if (result) {
        this.$router.replace(this.fun.getUrl("goods", { id: this.$route.query.g_id }, { qr_num: this.$route.query.qr_num }));
      } else {
        this.$dialog
          .confirm({
            title: "提示",
            message: msg,
            showCancelButton: false,
            confirmButtonText: "确定"
          })
          .then(() => {
            this.$router.push(this.fun.getUrl("home", {}));
          });
      }
    }
  }
};
</script>
<style lang="scss" scoped></style>
